# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: Ivan Shapovalov <intelfx@intelfx.name>

pkgname=python-pycryptodomex
pkgver=3.12.0
pkgrel=2

pkgdesc='A self-contained Python package of low-level cryptographic primitives'
url='https://www.pycryptodome.org/'
arch=('loong64' 'x86_64')
license=('BSD')

depends=('python')
makedepends=('python-setuptools')

source=("https://pypi.org/packages/source/p/pycryptodomex/pycryptodomex-$pkgver.zip")
sha512sums=('fca639c5e31a59ca16e524894873f8bbedabb12b3697b5a6a11001c3479ea534ff8a5a7b9c90ea7eae5eacdb3fa7770c92e0317ab620c8e016e2be3c2a77ab78')

build() {
	cd "$srcdir"/pycryptodomex-$pkgver
	python setup.py build
}

package_python-pycryptodomex() {
	cd pycryptodomex-$pkgver
	python setup.py install --root="$pkgdir" --optimize=1 --skip-build

	install -Dm644 LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst
}
